Conversation
|
@lazzyms is attempting to deploy a commit to the osama's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for the pull request! ✅ A maintainer will review this soon. Please be patient while we take a look. 🙌 |
There was a problem hiding this comment.
Pull request overview
Adds GitHub user display metadata (full name + avatar) to the compare flow so the UI can show richer user headers, while also tightening some TypeScript error handling and updating lint/tooling.
Changes:
- Extend GitHub data fetching + API response to include
nameandavatarUrl. - Update comparison UI to render avatar + display name (with username fallback).
- Replace some
anyusages withunknownand introduce a flat ESLint config + updated lint script.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
types/user-result.ts |
Adds name/avatarUrl to the UI-facing user result model. |
types/github.ts |
Adds name/avatarUrl to the GitHub fetch result type. |
lib/github.ts |
Updates GraphQL query + mapping to return name/avatarUrl. |
app/api/compare/route.ts |
Includes name/avatarUrl in API output and improves error typing. |
components/comparison-table.tsx |
Renders avatar + display name in the comparison table header. |
next.config.js |
Allows next/image to load GitHub avatar images from avatars.githubusercontent.com. |
app/page.tsx |
Improves catch typing from any → unknown. |
components/compare-form.tsx |
Improves prop typing (any → unknown). |
components/top-list.tsx |
Replaces badge/icon any types with ReactNode. |
components/result-dashboard.tsx |
Fixes apostrophe HTML escaping in tie message. |
components/breakdown-bars.tsx |
Removes unused array (cleanup). |
eslint.config.mjs |
Introduces flat ESLint config using Next configs. |
package.json |
Changes lint script to run ESLint directly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Hub user data fetching
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| type CompareFormProps = { | ||
| data?: any; | ||
| data?: unknown; |
There was a problem hiding this comment.
I couldn't review the changes because the build was failing with Type 'unknown' is not assignable to type 'ReactNode'. This occurred because {data && } returns the value of data if truthy. Since data is typed as unknown, TypeScript cannot guarantee it is a valid renderable React child.
Solution: Try to apply the boolean coercion (!!data) to the conditional rendering block, take your time to find the solution that's fit the problem.
Fixes #63
This pull request introduces several improvements and refactors to enhance user profile display, strengthen type safety, and update project tooling. The main feature is the addition of user avatars and display names throughout the UI, supported by changes to the API, data fetching, and types. It also improves error handling and updates ESLint configuration for better code quality.
User Profile Enhancements
nameandavatarUrlfields toUserResult,GitHubUserData, and related types, and updated the GitHub GraphQL query and data fetching logic inlib/github.tsto retrieve and return these fields. [1] [2] [3] [4]app/api/compare/route.tsto includenameandavatarUrlfor each user, and adjusted the UI incomponents/comparison-table.tsxto display user avatars and names. [1] [2]Type Safety Improvements
anytypes withunknownin several components and API handlers to improve type safety, e.g., incomponents/compare-form.tsx,app/page.tsx, andapp/api/compare/route.ts. [1] [2] [3]components/top-list.tsxto useReactNodeinstead ofanyfor better type checking. [1] [2]Tooling and Code Quality
eslint.config.mjsusing Next.js recommended configs and updated thelintscript inpackage.jsonto use ESLint directly. [1] [2]UI and Content Tweaks
components/result-dashboard.tsx.components/comparison-table.tsx.Code Cleanup
itemsarray incomponents/breakdown-bars.tsxand cleaned up type definitions incomponents/comparison-table.tsx. [1] [2]